package com.lry.basic.design_mode.strategy;

/**
 * @author:刘仁有
 * @desc:
 * @email:953506233@qq.com
 * @data:2019/11/11
 */
public class Main {
    public static void main(String[] args) {
        Context ctx = new Context();
        ctx.setOperation(new AddOperation());
        System.out.println(ctx.execute(1, 1));
        ctx.setOperation(new DivOperation());
        System.out.println(ctx.execute(1, 0.0));
    }
}
